package com.itheima09;

public class Test {
    public static void main(String[] args) {
        method1(10, 20, new JieKou() {
            @Override
            public int method(int a, int b) {
                return a + b;
            }
        });
        method1(10, 20, ( a,  b) ->
             a - b
        );

    }

    public static void method1(int a, int b, JieKou j) {
        int result = j.method(a, b);
        System.out.println(result);
    }
}
